/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TotalCommanderDemo.java
 *
 * Created on Apr 9, 2009, 9:29:22 PM
 */
package tynitotalcommander;
// Bi doi icon sau khi sua ten
// file ko co duoi ko hien len duoc

import java.awt.Desktop;
import java.awt.HeadlessException;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.filechooser.FileSystemView;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
import Control.*;
import Custom.*;

/**
 *
 * @author Huynh Duy Khuong
 */
public class MiniTotalCommanderView extends javax.swing.JFrame {

    /** Creates new form TotalCommanderDemo */
    private JTable tableLeft;
    private JTable tableRight;
    private File fileLeft;
    private File fileRight;
    private Side currentSide;
    private View currentView;

    private void doEdit() throws HeadlessException {
        // TODO add your handling code here:
        File f;
        if (currentSide == Side.LEFT) {
            f = FileUtilities.getSelectedFileInTable(this.tableLeft);
        } else {
            f = FileUtilities.getSelectedFileInTable(this.tableRight);
        }
        try {
            boolean b = MiniTotalCommanderControl.editFile(f);
            if (b == false) {
                JOptionPane.showMessageDialog(rootPane, "No files selected");
            }
        } catch (IOException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private enum View {

        FULL, BRIEF
    }

    private enum Side {

        LEFT, RIGHT
    }

    /** Khoi tao frame MiniTotalCommanderView
     * 
     */
    public MiniTotalCommanderView() {

        initComponents();
        currentView = View.FULL;
        this.listRoots();

        this.fileLeft = new File((String) jcbListRootsLeft.getSelectedItem());
        this.fileRight = new File((String) jcbListRootsRight.getSelectedItem());

        jlabCurrentFolderLeft.setText(this.fileLeft.getPath());
        jlabCurrentFolderRight.setText(this.fileRight.getPath());

        this.browseFileLeft();
        this.browseFileRight();

        //InitialFocusSetter.setInitialFocus(this, this.tableLeft);
        tableLeft.requestFocus();
        tableLeft.changeSelection(0, 0, false, false);

    //tableLeft.scrollRectToVisible(
    //tableLeft.getCellRect( 0, 0, true ) );
       /*manager = new BorderLayout();
    this.add(jScrollPaneLeft, BorderLayout.CENTER);
    this.add(jScrollPaneRight, BorderLayout.CENTER);

    this.add(jbnView, BorderLayout.SOUTH);
    this.add(jbnEdit, BorderLayout.SOUTH);
    this.add(jbnCopy, BorderLayout.SOUTH);
    this.add(jbnMove, BorderLayout.SOUTH);
    this.add(jbnDelete, BorderLayout.SOUTH);
    this.add(jbnNewFolder, BorderLayout.SOUTH);
    this.add(jbnExit, BorderLayout.SOUTH);*/
    }

    // Ham xu ly nghiep vu
    /** Liet ke cac o dia co trong he thong
     *
     */
    public void listRoots() {
        File[] lstRoots = File.listRoots();
        for (int i = 0; i < lstRoots.length; i++) {
            jcbListRootsLeft.addItem(lstRoots[i].getPath());
            jcbListRootsRight.addItem(lstRoots[i].getPath());
        }
    }

    /** Liet ke danh sach file va folder vao panel ben phai
     *
     */
    public void browseFileRight() {
        jlabCurrentFolderRight.setText(this.fileRight.getPath());
        File[] files = this.fileRight.listFiles();

        if (files != null) {
            DefaultTableModel detabModel = CreateTableModel(files);

            this.tableRight = new JTable(detabModel);

            /*this.tableRight.addKeyListener(new java.awt.event.KeyAdapter() {

            @Override
            public void keyPressed(java.awt.event.KeyEvent evt) {
            _tableKeyPressedRight(evt);
            }
            });*/
            this.tableRight.addMouseListener(new java.awt.event.MouseAdapter() {

                @Override
                public void mousePressed(java.awt.event.MouseEvent evt) {
                    _tableMousePressedRight(evt);
                }
            });
            this.tableRight.addFocusListener(new java.awt.event.FocusAdapter() {

                @Override
                public void focusGained(java.awt.event.FocusEvent evt) {
                    tableRightFocusGained(evt);
                }
            });
            this.tableRight.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {
                    browseFileRight();
                }
            });

            FormatTable(this.tableRight);
            this.jScrollPaneRight.setViewportView(this.tableRight);
            tableRight.requestFocus();
        }
    }

    /** Liet ke danh sach file va folder vao panel ben trai
     *
     */
    public void browseFileLeft() {
        jlabCurrentFolderLeft.setText(this.fileLeft.getPath());
        File[] files = this.fileLeft.listFiles();

        if (files != null) {
            DefaultTableModel detabModel = CreateTableModel(files);

            this.tableLeft = new JTable(detabModel);
            /*this.tableLeft.addKeyListener(new java.awt.event.KeyAdapter() {

            @Override
            public void keyPressed(java.awt.event.KeyEvent evt) {
            _tableKeyPressedLeft(evt);
            }
            });*/
            this.tableLeft.addMouseListener(new java.awt.event.MouseAdapter() {

                @Override
                public void mousePressed(java.awt.event.MouseEvent evt) {
                    _tableMousePressedLeft(evt);
                }
            });
            this.tableLeft.addFocusListener(new java.awt.event.FocusAdapter() {

                @Override
                public void focusGained(java.awt.event.FocusEvent evt) {
                    tableLeftFocusGained(evt);
                }
            });
            this.tableLeft.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {

                    browseFileLeft();
                }
            });

            //  this._table.setCellSelectionEnabled(true);
            FormatTable(this.tableLeft);
            this.jScrollPaneLeft.setViewportView(this.tableLeft);
            tableLeft.requestFocus();
        }
    }

    private DefaultTableModel CreateTableModel(File[] files) {
        String[] columnFullView = new String[]{"Name", "Ext", "Size", "Date", "Attr"};
        DefaultTableModel detabModel = new DefaultTableModel(columnFullView, 0);
        String[] temp;
        String name = "";
        String ext = "";
        String size = "";
        String date = "";
        //String attr;
        String fullName;
        ImageIcon icon = null;
        for (int i = 0; i < files.length; i++) {
            FileSystemView f = FileSystemView.getFileSystemView();
            icon = (ImageIcon) f.getSystemIcon(files[i]);
            fullName = files[i].getName();
            Date d = new Date(files[i].lastModified());
            String pattern = "MM/dd/yyyy HH:mm";
            SimpleDateFormat format = new SimpleDateFormat(pattern);

            date = format.format(d);
            size = String.valueOf(files[i].length());
            name = FileUtilities.getNameWithoutExt(files[i]);
            ext = FileUtilities.getExtension(files[i]);

            if (files[i].isDirectory()) {
                size = "DIR";
            }

            MyLabel lb = new MyLabel();
            lb.setIcon(icon);
            lb.setText(name);
            lb.setTag(files[i]);

            if (currentView == View.BRIEF) {
                size = "";
                date = "";
            }
            detabModel.addRow(new Object[]{lb, ext, size, date});
        }
        return detabModel;
    }

    // Local function
    private void FormatTable(JTable table) {
        //  this._table.setCellSelectionEnabled(true);
        table.removeEditor();
        table.setShowGrid(false);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

        TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(table.getModel());
        table.setRowSorter(sorter);

        ArrayList<RowSorter.SortKey> sortKeys = new ArrayList<RowSorter.SortKey>();
        sortKeys.add(new RowSorter.SortKey(2, SortOrder.DESCENDING));
        sorter.setSortKeys(sortKeys);

        TableColumn tcol;
        tcol = table.getColumnModel().getColumn(0);
        tcol.setCellRenderer(new CustomTableCellRenderer());
        for (int i = 0; i < table.getColumnCount(); i++) {
            table.getColumnModel().getColumn(i).setCellEditor(new CustomTableCellEditor(new JTextField()));
        }
        //table.setCellEditor(new CustomTableCellEditor());

        /*Set<AWTKeyStroke> set = table.getFocusTraversalKeys(KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS);
        set = new HashSet(set);
        KeyStroke up = KeyStroke.getKeyStroke("A");
        set.add(up);

        table.setFocusTraversalKeys(KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, set);*/

        //http://www.java-forums.org/awt-swing/9228-jframe-jtable-cell.html
        InputMap im = table.getInputMap(JTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        KeyStroke tab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
        KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
        im.put(tab, "none");
    //im.put(enter, "none");
    }

    private void CopyFromLeftToRight() throws IOException {
        int rowIndexView = tableLeft.getSelectedRow();
        int rowIndexModel = tableLeft.convertRowIndexToModel(rowIndexView);
        int columnIndex = 0;
        MyLabel label = (MyLabel) tableLeft.getModel().getValueAt(rowIndexModel, columnIndex);
        File source = (File) label.getTag();

        File dest = new File(jlabCurrentFolderRight.getText());

        MiniTotalCommanderControl.copy(source, dest);

        browseFileRight();
        JOptionPane.showMessageDialog(rootPane, "Copy finished");
    }

    private void CopyFromRightToLeft() throws IOException {
        int rowIndexView = tableRight.getSelectedRow();
        int rowIndexModel = tableRight.convertRowIndexToModel(rowIndexView);
        int columnIndex = 0;
        MyLabel label = (MyLabel) tableRight.getModel().getValueAt(rowIndexModel, columnIndex);
        File source = (File) label.getTag();

        File dest = new File(jlabCurrentFolderLeft.getText());

        MiniTotalCommanderControl.move(source, dest);

        browseFileLeft();
        JOptionPane.showMessageDialog(rootPane, "Copy finished");
    }

    private void MoveFromLeftToRight() throws IOException {
        int rowIndexView = tableLeft.getSelectedRow();
        int rowIndexModel = tableLeft.convertRowIndexToModel(rowIndexView);
        int columnIndex = 0;
        MyLabel label = (MyLabel) tableLeft.getModel().getValueAt(rowIndexModel, columnIndex);
        File source = (File) label.getTag();

        File dest = new File(jlabCurrentFolderRight.getText());

        MiniTotalCommanderControl.move(source, dest);

        browseFileRight();
        JOptionPane.showMessageDialog(rootPane, "Move finished");
    }

    private void MoveFromRightToLeft() throws IOException {
        int rowIndexView = tableRight.getSelectedRow();
        int rowIndexModel = tableRight.convertRowIndexToModel(rowIndexView);
        int columnIndex = 0;
        MyLabel label = (MyLabel) tableRight.getModel().getValueAt(rowIndexModel, columnIndex);
        File source = (File) label.getTag();

        File dest = new File(jlabCurrentFolderLeft.getText());

        MiniTotalCommanderControl.copy(source, dest);

        browseFileLeft();
        JOptionPane.showMessageDialog(rootPane, "Move finished");
    }

    private void doCopy() {
        try {
            if (currentSide == Side.LEFT) {
                CopyFromLeftToRight();
            } else {
                CopyFromRightToLeft();
            }
        } catch (IOException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void doMove() {
        try {
            if (currentSide == Side.LEFT) {
                MoveFromLeftToRight();
            } else {
                MoveFromRightToLeft();
            }
        } catch (IOException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void doRename() {
    }

    private void doNewFolder() {
        String folderName = JOptionPane.showInputDialog(this, "New directory", "Mini total commander", JOptionPane.OK_CANCEL_OPTION);
        if (folderName != null && folderName.compareTo("") != 0) {
            if (currentSide == Side.LEFT) {
                folderName = jlabCurrentFolderLeft.getText() + folderName;
            } else {
                folderName = jlabCurrentFolderRight.getText() + folderName;
            }

            MiniTotalCommanderControl.newFolder(folderName);
            browseFileLeft();
            browseFileRight();
        }
    }

    private void doDelete() {
        File f;
        if (currentSide == Side.LEFT) {
            f = FileUtilities.getSelectedFileInTable(tableLeft);
        } else {
            f = FileUtilities.getSelectedFileInTable(tableRight);
        }
        try {
            MiniTotalCommanderControl.delete(f);
            browseFileLeft();
            browseFileRight();
        } catch (IOException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void doView() {
        File f;
        if (currentSide == Side.LEFT) {
            f = FileUtilities.getSelectedFileInTable(this.tableLeft);
        } else {
            f = FileUtilities.getSelectedFileInTable(this.tableRight);
        }

        try {
            MiniTotalCommanderControl.viewFile(f);
        } catch (IOException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void doZip() {
        // Lay nhung file can zip
        File[] files;
        if (currentSide == Side.LEFT) {
            files = FileUtilities.getSelectedFilesInTable(tableLeft);
        } else {
            files = FileUtilities.getSelectedFilesInTable(tableRight);
        }
        String nameFileZip;
        if (files.length == 1) {
            nameFileZip = FileUtilities.appendExt(FileUtilities.getNameWithoutExt(files[0]), "zip");
        } else {
            nameFileZip = "Document.zip";
        }
        try {
            MiniTotalCommanderControl.zipFiles(files, nameFileZip);
            browseFileLeft();
            browseFileRight();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void doUnzip() {
        File file;
        if (currentSide == Side.LEFT) {
            file = FileUtilities.getSelectedFileInTable(tableLeft);
        } else {
            file = FileUtilities.getSelectedFileInTable(tableRight);
        }

        try {
            MiniTotalCommanderControl.unZip(file, FileUtilities.getNameWithoutExt(file));
            browseFileLeft();
            browseFileRight();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
// End local function

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPaneLeft = new javax.swing.JScrollPane();
        jScrollPaneRight = new javax.swing.JScrollPane();
        jcbListRootsLeft = new javax.swing.JComboBox();
        jcbListRootsRight = new javax.swing.JComboBox();
        jlabCurrentFolderLeft = new javax.swing.JLabel();
        jlabCurrentFolderRight = new javax.swing.JLabel();
        jbnView = new javax.swing.JButton();
        jbnEdit = new javax.swing.JButton();
        jbnCopy = new javax.swing.JButton();
        jbnMove = new javax.swing.JButton();
        jbnNewFolder = new javax.swing.JButton();
        jbnDelete = new javax.swing.JButton();
        jbnExit = new javax.swing.JButton();
        jToolBar1 = new javax.swing.JToolBar();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItemPack = new javax.swing.JMenuItem();
        jMenuItemUnpack = new javax.swing.JMenuItem();
        jMenu8 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItemEdit = new javax.swing.JMenuItem();
        jMenuItemCopy = new javax.swing.JMenuItem();
        jMenuItemMove = new javax.swing.JMenuItem();
        jMenuItemNewFolder = new javax.swing.JMenuItem();
        jMenuItemDelete = new javax.swing.JMenuItem();
        jMenuItemRename = new javax.swing.JMenuItem();
        jMenuItemNewFile = new javax.swing.JMenuItem();
        jMenuItemBrowseFile = new javax.swing.JMenuItem();
        jMenuItemTab = new javax.swing.JMenuItem();
        jMenuItemBack = new javax.swing.JMenuItem();
        jMenuItemDel = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();
        jMenu5 = new javax.swing.JMenu();
        jMenuItemBrief = new javax.swing.JMenuItem();
        jMenuItemFull = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        jMenu7 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                formFocusGained(evt);
            }
        });

        jScrollPaneLeft.setName("jScrollPaneLeft"); // NOI18N

        jScrollPaneRight.setName("jScrollPaneRight"); // NOI18N

        jcbListRootsLeft.setName("jcbListRootsLeft"); // NOI18N
        jcbListRootsLeft.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbListRootsLeftActionPerformed(evt);
            }
        });

        jcbListRootsRight.setName("jcbListRootsRight"); // NOI18N
        jcbListRootsRight.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jcbListRootsRightItemStateChanged(evt);
            }
        });
        jcbListRootsRight.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbListRootsRightActionPerformed(evt);
            }
        });
        jcbListRootsRight.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jcbListRootsRightPropertyChange(evt);
            }
        });

        jlabCurrentFolderLeft.setBackground(java.awt.SystemColor.activeCaption);
        jlabCurrentFolderLeft.setFont(new java.awt.Font("Tahoma", 1, 11));
        jlabCurrentFolderLeft.setText("current folder");

        jlabCurrentFolderRight.setBackground(new java.awt.Color(153, 180, 209));
        jlabCurrentFolderRight.setFont(new java.awt.Font("Tahoma", 1, 11));
        jlabCurrentFolderRight.setText("current folder");

        jbnView.setText("F3 View");
        jbnView.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnViewActionPerformed(evt);
            }
        });

        jbnEdit.setText("F4 Edit");
        jbnEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnEditActionPerformed(evt);
            }
        });

        jbnCopy.setText("F5 Copy");
        jbnCopy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnCopyActionPerformed(evt);
            }
        });

        jbnMove.setText("F6 Move");
        jbnMove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnMoveActionPerformed(evt);
            }
        });

        jbnNewFolder.setText("F7 New Folder");
        jbnNewFolder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnNewFolderActionPerformed(evt);
            }
        });

        jbnDelete.setText("F8 Delete");
        jbnDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnDeleteActionPerformed(evt);
            }
        });

        jbnExit.setText("Alt + F4 Exit");
        jbnExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnExitActionPerformed(evt);
            }
        });

        jToolBar1.setRollover(true);

        jMenu1.setText("File");
        jMenu1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu1ActionPerformed(evt);
            }
        });

        jMenuItemPack.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemPack.setText("Pack");
        jMenuItemPack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemPackActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemPack);

        jMenuItemUnpack.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemUnpack.setText("Unpack Specific Files...");
        jMenuItemUnpack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemUnpackActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemUnpack);

        jMenu8.setText("Hidden");

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F3, 0));
        jMenuItem1.setText("View");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItem1);

        jMenuItemEdit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, 0));
        jMenuItemEdit.setText("Edit");
        jMenuItemEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemEditActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemEdit);

        jMenuItemCopy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
        jMenuItemCopy.setText("Copy");
        jMenuItemCopy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemCopyActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemCopy);

        jMenuItemMove.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, 0));
        jMenuItemMove.setText("Move");
        jMenuItemMove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemMoveActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemMove);

        jMenuItemNewFolder.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F7, 0));
        jMenuItemNewFolder.setText("New Folder");
        jMenuItemNewFolder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemNewFolderActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemNewFolder);

        jMenuItemDelete.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F8, 0));
        jMenuItemDelete.setText("Delete");
        jMenuItemDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemDeleteActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemDelete);

        jMenuItemRename.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, java.awt.event.InputEvent.SHIFT_MASK));
        jMenuItemRename.setText("Rename");
        jMenuItemRename.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemRenameActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemRename);

        jMenuItemNewFile.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.SHIFT_MASK));
        jMenuItemNewFile.setText("New File");
        jMenuItemNewFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemNewFileActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemNewFile);

        jMenuItemBrowseFile.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0));
        jMenuItemBrowseFile.setText("BrowseFile");
        jMenuItemBrowseFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemBrowseFileActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemBrowseFile);

        jMenuItemTab.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB, 0));
        jMenuItemTab.setText("Tab");
        jMenuItemTab.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemTabActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemTab);

        jMenuItemBack.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_BACK_SPACE, 0));
        jMenuItemBack.setText("Back");
        jMenuItemBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemBackActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemBack);

        jMenuItemDel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DELETE, 0));
        jMenuItemDel.setText("Del");
        jMenuItemDel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemDelActionPerformed(evt);
            }
        });
        jMenu8.add(jMenuItemDel);

        jMenu1.add(jMenu8);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Mark");
        jMenuBar1.add(jMenu2);

        jMenu3.setText("Commands");
        jMenuBar1.add(jMenu3);

        jMenu4.setText("Net");
        jMenuBar1.add(jMenu4);

        jMenu5.setText("Show");

        jMenuItemBrief.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemBrief.setText("Brief");
        jMenuItemBrief.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemBriefActionPerformed(evt);
            }
        });
        jMenu5.add(jMenuItemBrief);

        jMenuItemFull.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemFull.setText("Full");
        jMenuItemFull.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemFullActionPerformed(evt);
            }
        });
        jMenu5.add(jMenuItemFull);

        jMenuBar1.add(jMenu5);

        jMenu6.setText("Configuration");
        jMenuBar1.add(jMenu6);

        jMenu7.setText("Start");
        jMenuBar1.add(jMenu7);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jbnView)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbnEdit)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbnCopy)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbnMove)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbnNewFolder)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbnDelete)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbnExit))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jcbListRootsLeft, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPaneLeft, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
                            .addComponent(jlabCurrentFolderLeft))
                        .addGap(32, 32, 32)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jcbListRootsRight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPaneRight, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE)
                            .addComponent(jlabCurrentFolderRight, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE))))
                .addContainerGap())
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 635, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcbListRootsLeft, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbListRootsRight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlabCurrentFolderRight, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE)
                    .addComponent(jlabCurrentFolderLeft, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jScrollPaneRight)
                    .addComponent(jScrollPaneLeft, javax.swing.GroupLayout.PREFERRED_SIZE, 398, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbnView)
                    .addComponent(jbnEdit)
                    .addComponent(jbnCopy)
                    .addComponent(jbnMove)
                    .addComponent(jbnNewFolder)
                    .addComponent(jbnDelete)
                    .addComponent(jbnExit))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

// Ham xu ly su kien
    private void tableRightFocusGained(java.awt.event.FocusEvent evt) {
        // TODO add your handling code here:
        tableLeft.clearSelection();
        currentSide = Side.RIGHT;
    }

    private void tableLeftFocusGained(java.awt.event.FocusEvent evt) {
        // TODO add your handling code here:
        tableRight.clearSelection();
        currentSide = Side.LEFT;
    }

    private void _tableMousePressedLeft(MouseEvent evt) {
        // TODO add your handling code here:
        if (evt.getClickCount() == 2) {
            JTable table = (JTable) evt.getSource();
            int rowIndexView = table.getSelectedRow();
            int rowIndexModel = this.tableLeft.convertRowIndexToModel(rowIndexView);
            int columnIndex = 0;
            MyLabel label = (MyLabel) table.getModel().getValueAt(rowIndexModel, columnIndex);
            this.fileLeft = (File) label.getTag();
            if (this.fileLeft.isDirectory()) {
                this.browseFileLeft();
            } else {
                try {
                    Desktop.getDesktop().open(fileLeft);
                } catch (IOException ex) {
                    Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            tableLeft.requestFocus();
        }
    }

    private void _tableMousePressedRight(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        if (evt.getClickCount() == 2) {
            JTable table = (JTable) evt.getSource();
            int rowIndexView = table.getSelectedRow();
            int rowIndexModel = this.tableRight.convertRowIndexToModel(rowIndexView);
            int columnIndex = 0;
            MyLabel label = (MyLabel) table.getModel().getValueAt(rowIndexModel, columnIndex);
            this.fileRight = (File) label.getTag();
            if (this.fileRight.isDirectory()) {
                this.browseFileRight();
            } else {
                try {
                    Desktop.getDesktop().open(fileRight);
                } catch (IOException ex) {
                    Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            tableRight.requestFocus();
        }
    }

    private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu1ActionPerformed
        // TODO add your handling code here:
        //Create a panel and add components to it.        
    }//GEN-LAST:event_jMenu1ActionPerformed

    private void jMenuItemNewFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNewFileActionPerformed
        // TODO add your handling code here:
        String filename = JOptionPane.showInputDialog(this, "Enter filename to edit", "Mini total commander", JOptionPane.OK_CANCEL_OPTION);
        if (filename != null && filename.compareTo("") != 0) {
            if (currentSide == Side.LEFT) {
                filename = jlabCurrentFolderLeft.getText() + filename;
            } else {
                filename = jlabCurrentFolderRight.getText() + filename;
            }

            File f = new File(filename);
            try {
                f.createNewFile();
                MiniTotalCommanderControl.runFile(f.getPath());
                if (currentSide == Side.LEFT) {
                    browseFileLeft();
                } else {
                    browseFileRight();
                }


            } catch (IOException ex) {
                Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
}//GEN-LAST:event_jMenuItemNewFileActionPerformed

    private void jMenuItemRenameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemRenameActionPerformed
        // TODO add your handling code here:
        int r = tableLeft.getSelectedRow();
        tableLeft.editCellAt(r, 0);

}//GEN-LAST:event_jMenuItemRenameActionPerformed

    private void jMenuItemBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemBackActionPerformed
        // TODO add your handling code here:
        if (currentSide == Side.LEFT) {
            if (this.fileLeft.getParent() != null) {
                this.fileLeft = new File(this.fileLeft.getParent());
                this.browseFileLeft();
            }
        } else {
            if (this.fileRight.getParent() != null) {
                this.fileRight = new File(this.fileRight.getParent());
                this.browseFileRight();
            }
        }
}//GEN-LAST:event_jMenuItemBackActionPerformed

    private void jcbListRootsLeftActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbListRootsLeftActionPerformed
        // TODO add your handling code here:
        this.fileLeft = new File((String) jcbListRootsLeft.getSelectedItem());
        jlabCurrentFolderLeft.setText(this.fileLeft.getPath());
        this.browseFileLeft();
    }//GEN-LAST:event_jcbListRootsLeftActionPerformed

    private void jcbListRootsRightActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbListRootsRightActionPerformed
        // TODO add your handling code here:
        this.fileRight = new File((String) jcbListRootsRight.getSelectedItem());
        jlabCurrentFolderRight.setText(this.fileRight.getPath());
        this.browseFileRight();
    }//GEN-LAST:event_jcbListRootsRightActionPerformed

    private void jMenuItemCopyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCopyActionPerformed
        // TODO add your handling code here:
        doCopy();
}//GEN-LAST:event_jMenuItemCopyActionPerformed

    private void formFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formFocusGained
        // TODO add your handling code here:
    }//GEN-LAST:event_formFocusGained

    private void jMenuItemTabActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemTabActionPerformed
        // TODO add your handling code here:
        if (currentSide == Side.LEFT) {
            tableLeft.clearSelection();
            tableRight.requestFocus();
            tableRight.changeSelection(0, 0, false, false);
        } else {
            tableRight.clearSelection();
            tableLeft.requestFocus();
            tableLeft.changeSelection(0, 0, false, false);
        }
}//GEN-LAST:event_jMenuItemTabActionPerformed

    private void jcbListRootsRightItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jcbListRootsRightItemStateChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_jcbListRootsRightItemStateChanged

    private void jcbListRootsRightPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jcbListRootsRightPropertyChange
        // TODO add your handling code here:
        System.out.print(evt.getNewValue().getClass());
    }//GEN-LAST:event_jcbListRootsRightPropertyChange

    private void jMenuItemBrowseFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemBrowseFileActionPerformed
        // TODO add your handling code here:

        if (currentSide == Side.RIGHT) {
            this.fileRight = FileUtilities.getSelectedFileInTable(this.tableRight);
        }

        if (this.fileRight.isDirectory()) {
            this.browseFileRight();
        } else {
            try {
                Desktop.getDesktop().open(fileRight);
            } catch (IOException ex) {
                Logger.getLogger(MiniTotalCommanderView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
}//GEN-LAST:event_jMenuItemBrowseFileActionPerformed

    private void jbnViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnViewActionPerformed
        // TODO add your handling code here:
        doView();
    }//GEN-LAST:event_jbnViewActionPerformed

    private void jbnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnEditActionPerformed
        doEdit();
    }//GEN-LAST:event_jbnEditActionPerformed

    private void jbnCopyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnCopyActionPerformed
        // TODO add your handling code here:
        doCopy();
    }//GEN-LAST:event_jbnCopyActionPerformed

    private void jbnMoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnMoveActionPerformed
        // TODO add your handling code here:
        doMove();
    }//GEN-LAST:event_jbnMoveActionPerformed

    private void jbnNewFolderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnNewFolderActionPerformed
        // TODO add your handling code here:
        doNewFolder();
    }//GEN-LAST:event_jbnNewFolderActionPerformed

    private void jbnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnDeleteActionPerformed
        // TODO add your handling code here:
        doDelete();
    }//GEN-LAST:event_jbnDeleteActionPerformed

    private void jbnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnExitActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_jbnExitActionPerformed

    private void jMenuItemDelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDelActionPerformed
        // TODO add your handling code here:
        doDelete();
    }//GEN-LAST:event_jMenuItemDelActionPerformed

    private void jMenuItemPackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemPackActionPerformed
        // TODO add your handling code here:
        doZip();
    }//GEN-LAST:event_jMenuItemPackActionPerformed

    private void jMenuItemUnpackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemUnpackActionPerformed
        // TODO add your handling code here:
        doUnzip();
    }//GEN-LAST:event_jMenuItemUnpackActionPerformed

    private void jMenuItemMoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemMoveActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jMenuItemMoveActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        doView();
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItemBriefActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemBriefActionPerformed
        // TODO add your handling code here:
        currentView = View.BRIEF;
        if (currentSide == Side.LEFT) {
            browseFileLeft();
        } else {
            browseFileRight();
        }
    }//GEN-LAST:event_jMenuItemBriefActionPerformed

    private void jMenuItemFullActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemFullActionPerformed
        // TODO add your handling code here:
        currentView = View.FULL;
        if (currentSide == Side.LEFT) {
            browseFileLeft();
        } else {
            browseFileRight();
        }
    }//GEN-LAST:event_jMenuItemFullActionPerformed

    private void jMenuItemEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditActionPerformed
        // TODO add your handling code here:
        doEdit();
}//GEN-LAST:event_jMenuItemEditActionPerformed

    private void jMenuItemNewFolderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNewFolderActionPerformed
        // TODO add your handling code here:
        doNewFolder();
    }//GEN-LAST:event_jMenuItemNewFolderActionPerformed

    private void jMenuItemDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDeleteActionPerformed
        // TODO add your handling code here:
        doDelete();
    }//GEN-LAST:event_jMenuItemDeleteActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                // Set component with initial focus; must be done before the frame is made visible
                MiniTotalCommanderView total = new MiniTotalCommanderView();

                total.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenu jMenu8;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItemBack;
    private javax.swing.JMenuItem jMenuItemBrief;
    private javax.swing.JMenuItem jMenuItemBrowseFile;
    private javax.swing.JMenuItem jMenuItemCopy;
    private javax.swing.JMenuItem jMenuItemDel;
    private javax.swing.JMenuItem jMenuItemDelete;
    private javax.swing.JMenuItem jMenuItemEdit;
    private javax.swing.JMenuItem jMenuItemFull;
    private javax.swing.JMenuItem jMenuItemMove;
    private javax.swing.JMenuItem jMenuItemNewFile;
    private javax.swing.JMenuItem jMenuItemNewFolder;
    private javax.swing.JMenuItem jMenuItemPack;
    private javax.swing.JMenuItem jMenuItemRename;
    private javax.swing.JMenuItem jMenuItemTab;
    private javax.swing.JMenuItem jMenuItemUnpack;
    private javax.swing.JScrollPane jScrollPaneLeft;
    private javax.swing.JScrollPane jScrollPaneRight;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JButton jbnCopy;
    private javax.swing.JButton jbnDelete;
    private javax.swing.JButton jbnEdit;
    private javax.swing.JButton jbnExit;
    private javax.swing.JButton jbnMove;
    private javax.swing.JButton jbnNewFolder;
    private javax.swing.JButton jbnView;
    private javax.swing.JComboBox jcbListRootsLeft;
    private javax.swing.JComboBox jcbListRootsRight;
    private javax.swing.JLabel jlabCurrentFolderLeft;
    private javax.swing.JLabel jlabCurrentFolderRight;
    // End of variables declaration//GEN-END:variables
}
